using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace uTILLIty.Rave.Contract.Configuration
{
	/// <summary>
	/// Represents details for locating a group in the backend credential store
	/// </summary>
	[Obsolete("Use Member.MemberType=Group instead", false)]
	public class Group : Member
	{
		/// <summary>
		/// the Default constructor used by the XML serializer
		/// </summary>
		public Group()
		{
			base.MemberType = MemberType.Group;
		}

		/// <summary>
		/// Creates a minimally defined <see cref="Group"/>
		/// </summary>
		/// <param name="id"><see cref="Member.ID"/></param>
		/// <param name="identifier"><see cref="Member.Identifier"/></param>
		/// <param name="identificationType"><see cref="Member.IdentificationType"/></param>
		public Group(string id, string identifier, string identificationType)
			: base(id, identifier, identificationType, MemberType.Group)
		{
		}

		/// <summary>
		/// The type of member
		/// </summary>
		[DefaultValue(MemberType.Group), XmlAttribute("type")]
		public override MemberType MemberType
		{
			get { return MemberType.Group; }
			// ReSharper disable ValueParameterNotUsed
			set { base.MemberType = MemberType.Group; }
			// ReSharper restore ValueParameterNotUsed
		}
	}
}